/**   
* @Title: SpaController.java 
* @Package com.hw.one.peach.core.controller 
* @Description: TODO() 
* @author songjundan   
* @date 2017年8月22日 下午3:50:00 
* @version V1.0   
*/ 
package com.hw.one.peach.core.controller;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.hw.one.core.controller.BaseController;
import com.hw.one.core.result.MsgResult;
import com.hw.one.peach.core.po.SpaPO;
import com.hw.one.peach.core.service.ISpaService;

/**
  * @author  sjd 
  * @date 创建时间：2017年8月22日 下午3:50:00 
  * @version 1.0.0
  */
@RestController
@RequestMapping(path = "spa")
public class SpaController extends BaseController{
	@Resource
	private ISpaService spaService;
	
	@RequestMapping(value = "hour", method = RequestMethod.POST)
	public MsgResult getSpaHourDataByTime(HttpServletRequest request){
		Map<String, Object> map = wrapParams(request);
		/*map.put("startTime", "2017-08-22 11:00:00");
		map.put("endTime", "2017-08-22 15:00:00");*/
	    String starttime = map.get("startTime").toString();
	    String endTime = map.get("endTime").toString();
		try{
			return  spaService.getSpaHourDataByTime(map);
			
		}catch(Exception e){
			log.error("查询站点信息", e);
			return MsgResult.exceptionResult();
		}
		
	}
	
}
